package com.juc.juc_project.threadbase.callable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Test {
	public static void main(String[] args) throws Exception, ExecutionException {
		
		FutureTask<Integer> ft=new FutureTask<Integer>(new Demo());
		Thread t=new Thread(ft,"线程call");
		t.start();
		System.out.println("1-100奇数之和："+ft.get());
	}
}
